package com.syh.jn.scm.infrastructure.repository.model.logistics;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
 * Created by soci.song on 2018/11/2.
 */
/**
 * 物流单
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "T_LOGISTICS_BILL")
@EqualsAndHashCode(callSuper = true)
public class LogisticsBillModel extends SuperBusinessModel {
    /**
     * 物流单编号
     */
    @Column(name = "CODE", columnDefinition = "varchar(100) COMMENT '订单编号'")
    private String code;
    /**
     * 对应订单id
     */
    @Column(name = "ORDER_ID", columnDefinition = "bigint COMMENT '订单ID'")
    private Long orderId;
    /**
     * 订单类型
     */
    @Column(name = "ORDER_TYPE", columnDefinition = "smallint COMMENT '订单类型 0：销售单 1：销售退货单 2：采购单 3：采购退货单'")
    private Short orderType;
    /**
     * 订单编号
     */
    @Column(name = "ORDER_CODE", columnDefinition = "varchar(100) COMMENT '订单编号'")
    private String orderCode;
    /**
     * 客户类型
     */
    @Column(name = "CUSTOMER_TYPE", columnDefinition = "smallint COMMENT '往来单位：0：上游供应商 1：下游采购商 2：物流'")
    private Short customerType;
    /**
     * 客户id
     */
    @Column(name = "CUSTOMER_ID", columnDefinition = "bigint COMMENT '客户ID'")
    private Long customerId;
    /**
     * 物流单据主体id（直采直销用：采购物流单作副单）
     */
    @Column(name = "SUBJECT_BILL_ID", columnDefinition = "bigint COMMENT '物流单据主体id（直采直销用：采购物流单作副单）'")
    private Long subjectBillId;
    /**
     * 物流状态(0：未发车 1：已发车 2：已收货)
     */
    @Column(name = "LOGISTICS_STATE", columnDefinition = "smallint COMMENT '物流状态(0：未发车 1：已发车 2：已收货)'")
    private Short logisticsState;
    /**
     * 物流单物流结算状态(0：未生成对账单 1：已生成对账单 -1：已取消)
     */
    @Column(name = "STATEMENT_STATE", columnDefinition = "smallint COMMENT '物流单物流结算状态(0：未生成对账单 1：已生成对账单 -1：已取消)'")
    private Short statementState;
    /**
     * 对应物流对账单id
     */
    @Column(name = "STATEMENT_ID", columnDefinition = "bigint COMMENT '物流对账单ID'")
    private Long statementId;
    /**
     * 物流类型(1:陆运 2:空运 3:海运)
     */
    @Column(name = "LOGISTICS_TYPE", columnDefinition = "smallint COMMENT '物流类型(1:陆运 2:空运 3:海运)'")
    private Short logisticsType;
    /**
     * 发货仓库id
     */
    @Column(name = "DEPOT_ID", columnDefinition = "bigint COMMENT '发货仓库id'")
    private Long depotId;
    /**
     * 物流公司id
     */
    @Column(name = "LOGISTICS_COMPANY_ID", columnDefinition = "bigint COMMENT '物流公司id'")
    private Long logisticsCompanyId;
    /**
     * 航班号
     */
    @Column(name = "FLIGHT_NUMBER", columnDefinition = "varchar(100) COMMENT '航班号'")
    private String flightNumber;
    /**
     * 海航号
     */
    @Column(name = "SHIPPING_NUMBER", columnDefinition = "varchar(100) COMMENT '海航号'")
    private String shippingNumber;
    /**
     * 货车车牌号
     */
    @Column(name = "PLATE_NUMBER", columnDefinition = "varchar(50) COMMENT '货车车牌号'")
    private String plateNumber;
    /**
     * 预计到达时间(物流)
     */
    @Column(name = "ETA_DATE_TIMESTAMP", columnDefinition = "bigint COMMENT '预计到达时间(物流)'")
    private Long etaDateTimestamp;
    /**
     * 司机姓名
     */
    @Column(name = "DRIVER_NAME", columnDefinition = "varchar(50) COMMENT '司机姓名'")
    private String driverName;
    /**
     * 司机联系电话
     */
    @Column(name = "DRIVER_CONTACT_PHONE", columnDefinition = "varchar(50) COMMENT '司机联系电话'")
    private String driverContactPhone;
    /**
     * 发货备注(物流)
     */
    @Column(name = "DELIVERY_NOTES", columnDefinition = "varchar(300) COMMENT '发货备注'")
    private String deliveryNotes;
    /**
     * 发货地区编码
     */
    @Column(name = "DELIVERY_DELI_AREA_CODE", columnDefinition = "varchar(50) COMMENT '发货地区编码'")
    private String deliveryDeliAreaCode;
    /**
     * 发货地址省 市 区
     */
    @Column(name = "DELIVERY_DELI_AREA", columnDefinition = "varchar(300) COMMENT '发货地址省 市 区'")
    private String deliveryDeliArea;
    /**
     * 发货人详细地址
     */
    @Column(name = "DELIVERY_DELI_ADDRESS", columnDefinition = "varchar(300) COMMENT '发货人详细地址'")
    private String deliveryDeliAddress;
    /**
     * 上传发货图片URL
     */
    @Column(name = "DELIVERY_CAR_IMG_URL", columnDefinition = "varchar(1000) COMMENT '上传发货图片URL'")
    private String deliveryCarImgUrl;
    /**
     * 上传发货图片URL
     */
    @Column(name = "DELIVERY_CONTRACT_IMG_URL", columnDefinition = "varchar(1000) COMMENT '上传发货图片URL'")
    private String deliveryContractImgUrl;
    /**
     * 发货位置信息
     */
    @Column(name = "DELIVERY_POSITION", columnDefinition = "varchar(300) COMMENT '发货位置信息'")
    private String deliveryPosition;
    /**
     * 发货时间
     */
    @Column(name = "DELIVERY_TIMESTAMP", columnDefinition = "bigint COMMENT '发货时间'")
    private Long deliveryTimestamp;
    /**
     * 运费承担方(0:买家承担  1:卖家承担费用)
     */
    @Column(name = "FREIGHT_TAKE", columnDefinition = "smallint COMMENT '运费承担方(0:买家承担  1:卖家承担费用)'")
    private Short freightTake;
    /**
     * 买家承担费用的运费方式(0:预收买家 1:买家到付)
     */
    @Column(name = "FREIGHT_TYPE", columnDefinition = "smallint COMMENT '买家承担费用的运费方式(0:预收买家 1:买家到付)'")
    private Short freightType;
    /**
     * 运费金额
     */
    @Column(name = "TOTAL_FREIGHT", columnDefinition = "decimal(19,2) COMMENT '运费金额'")
    private BigDecimal totalFreight;
    /**
     * 创建日期
     */
    @Column(name = "CREATE_TIME_STAMP", columnDefinition = "bigint COMMENT '创建日期'")
    private Long createTimeStamp;
    /**
     * 最后修改日期
     */
    @Column(name = "LAST_UPDATE_TIME_STAMP", columnDefinition = "bigint COMMENT '最后修改日期'")
    private Long lastUpdateTimeStamp;
    /**
     * 收货人姓名
     */
    @Column(name = "DELI_NAME", columnDefinition = "varchar(50) COMMENT '收货人姓名'")
    private String deliName;
    /**
     * 收货人联系电话
     */
    @Column(name = "DELI_TEL", columnDefinition = "varchar(50) COMMENT '收货人联系电话'")
    private String deliTel;
    /**
     * 要求到货时间
     */
    @Column(name = "RECEIVE_TIMESTAMP", columnDefinition = "bigint COMMENT '要求到货时间'")
    private Long receiveTimestamp;
    /**
     * 收货地区编码
     */
    @Column(name = "DELI_AREA_CODE", columnDefinition = "varchar(50) COMMENT '收货地区编码'")
    private String deliAreaCode;
    /**
     * 收货地址省 市 区
     */
    @Column(name = "DELI_AREA", columnDefinition = "varchar(300) COMMENT '收货地址省 市 区 使用[广东省,广州市,海珠区]格式保存'")
    private String deliArea;
    /**
     * 收货人详细地址
     */
    @Column(name = "DELI_ADDRESS", columnDefinition = "varchar(300) COMMENT '收货人详细地址'")
    private String deliAddress;
    /**
     * 上传收货图片URL
     */
    @Column(name = "COLLECT_CONTRACT_IMG_URL", columnDefinition = "varchar(1000) COMMENT '上传收货图片URL'")
    private String collectContractImgUrl;
    /**
     * 收货位置信息
     */
    @Column(name = "COLLECT_POSITION", columnDefinition = "varchar(300) COMMENT '收货位置信息'")
    private String collectPosition;
    /**
     * 入库时间(收货)
     */
    @Column(name = "STORAGE_TIMESTAMP", columnDefinition = "bigint COMMENT '入库时间(收货)'")
    private Long storageTimestamp;
    /**
     * 发货类型(1:物流发货,2:快递发货,3:其它发货)
     */
    @Column(name = "DELIVERY_TYPE", columnDefinition = "smallint COMMENT '发货类型(1:物流发货,2:快递发货,3:其它发货)'")
    private Short deliveryType;
    /**
     * 快递单号
     */
    @Column(name = "COURIER_NUMBER", columnDefinition = "varchar(100) COMMENT '快递单号'")
    private String courierNumber;
}
